package cn.shafish.serviceapi.dto;

import java.io.Serializable;

/**
 * 用户数据
 */
public class UserDTO implements Serializable {
    private Integer id;
    private String name;
    private Integer gender;

    public UserDTO() {
    }

    public Integer getId() {
        return id;
    }

    /**
     * 返回当前对象，可以设值时使用链式编程
     * @param id
     * @return
     */
    public UserDTO setId(Integer id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public UserDTO setName(String name) {
        this.name = name;
        return this;
    }

    public Integer getGender() {
        return gender;
    }

    public UserDTO setGender(Integer gender) {
        this.gender = gender;
        return this;
    }

    @Override
    public String toString() {
        return "UserDTO{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", gender=" + gender +
                '}';
    }
}
